package leetcode_201_300;

import java.util.Arrays;

public class LeeCode_242 {
    public static void main(String[] args) {

    }
    private static boolean isAnagram(String s, String t) {
        char[] as = s.toCharArray();
        Arrays.sort(as);
        char[] at = t.toCharArray();
        Arrays.sort(at);
        if (as.length != at.length)
            return false;
        for (int i = 0; i < as.length; i++) {
            if (as[i] != at[i]){
                return false;
            }
        }
        return true;
    }
}
